export default {

  /**获取全部的state*/
  getState (state) {
    return state
  },

  /**获取token*/
  getToken (state) {
    if (!state.token) {
      state.token = localStorage.getItem('token')
    }
    return state.token
  },

  /**获取购物车内的商品种类个数*/
  getCarListLength (state) {
    return state.carList.length
  },

  /**获取购物车内的商品列表*/
  getCarList (state) {
    return state.carList
  }

}